<#macro examItem exam>
	<div class="item-${exam.id} cf">
		<div class="col1-of-2">
			<span>${exam.id}</span>
			<p><strong>Profile:</strong> ${exam.profile.title}</p>
			<p>${exam.questionSize}</p>
			<p><strong>${exam.score+"%"}</strong>
				<span>
					<#if exam.score gt 69 && exam.pending == false>
						approved
					<#elseif exam.pending == false>
						failed
					<#else>
						not started
					</#if>
				</span>
			</p>
			<#if exam.finished == true>
				<label class="state">Finished</label>
			</#if>
		</div>
		<div class="col2-of-2">
			<#if exam.pending == true>
				<a  class="btn btn-default right" href="<@spring.url '/exams/apply/${exam.id}' />"> 
					<#if exam.started == true>
						pending
					<#else>
						apply
					</#if>
				</a>
			<#else>
				<p><label>Submitted date: </label> ${exam.submittedDate?datetime}</p>
				<a  class="btn btn-default right" href="<@spring.url '/exams/detail/${exam.id}' />"> see detail</a>
			</#if>
		</div>
	</div>
</#macro>